cmake_minimum_required(VERSION 3.21.2 FATAL_ERROR)

execute_process(COMMAND gcc -dumpfullversion -dumpversion OUTPUT_VARIABLE GCC_VERSION)
#message(STATUS "gcc version = ${GCC_VERSION}")

if (GCC_VERSION LESS "4.9.3")
    message(FATAL_ERROR "gcc version need greater than 4.9.3")
endif()

project(vector_index_helper CXX C)

# enable c++ 11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# take respectives flags for debug & release process 
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-std=c++11 -g -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_RELEASE_INIT "-std=c++11 -g -O2")

# default build type : Debug
if (NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Debug)
endif()

add_subdirectory(src)
#add_subdirectory(test)
#add_subdirectory(tools/client_simulator)
#add_subdirectory(tools/index_model_trainer)
#add_subdirectory(tools/vector_data_generator)
